﻿<%@ Page Language="C#" AutoEventWireup="true"  Inherits="GovernmentOfficeProject.common.view.ViewPageBase" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>修改密码</title>
    <link rel="stylesheet" type="text/css" href="/lib/easyui/themes/bootstrap/easyui.css"/>  
    <link rel="stylesheet" type="text/css" href="/lib/easyui/themes/icon.css"/>  
    <script type="text/javascript" src="/lib/easyui/jquery-1.8.0.min.js"></script>   
    <script type="text/javascript" src="/lib/easyui/jquery.easyui.min.js"></script>  
    <script type="text/javascript" src="/lib/easyui/plugins/jquery.datagrid.js"></script>  
    <script type="text/javascript" src="/lib/easyui/locale/easyui-lang-zh_CN.js"></script> 
    <style type="text/css">  
        html,body{padding:2px; margin:0;font-family:helvetica,tahoma,verdana,sans-serif;font-size:12px;}
        #fm{  
            margin:0;  
            padding:5px 30px;  
        }  
        .ftitle{  
            font-size:14px;  
            font-weight:bold;  
            padding:5px 0;  
            margin-bottom:10px;  
            border-bottom:1px solid #ccc;  
        }  
        .fitem{  
            margin-bottom:8px;  
        }  
        .fitem label{  
            display:inline-block;  
            width:50px;  
            text-align:right;
            padding-right:15px;
        }  
    </style>
    
    
    <script type="text/javascript">
        function save() {
            $('#fm').form('submit', {
                url: '/handler/SystemHandler.ashx?Action=saveNewPassword',
                onSubmit: function() {
                    var isSubmit = false;
                    isSubmit = $(this).form('validate');
                    if ($("#NewPassword").val() != $("#ConfirmPassword").val()) {
                        alert("两次密码输入不一致!");
                        return false;
                    }
                    return isSubmit;
                },
                success: function(result) {
                    var result = eval('(' + result + ')');
                    if (result.ErrMsg) {
                        alert(result.ErrMsg);
                    } else {
                        alert("密码修改成功，请重新登录！");
                        window.parent.history.go(1);
                        window.parent.history.forward(1);
                        window.parent.location.href = "/Login.htm";
                    }
                }
            });  
        }
    </script>
</head>
<body>
    
    <form id="fm" method="post" novalidate>
            <div class="fitem">  
                <label>旧密码</label>  
                <input name="OldPassword" id="OldPassword" type="password" class="easyui-validatebox" required="true"/>
            </div>  
            <div class="fitem">  
                <label>新密码</label>  
                <input name="NewPassword" id="NewPassword" type="password" class="easyui-validatebox" required="true"/>
            </div> 
            <div class="fitem">  
                <label>确认密码</label>  
                <input name="ConfirmPassword" id="ConfirmPassword" type="password" class="easyui-validatebox" required="true"/>
            </div>  
            <div class="fitem" style="padding-left:65px;padding-top:5px;">  
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="save()">保存</a>  
            </div>
    </form>
    
        
</body>
</html>
